//
//  MainTabViewController.swift
//  DataStructure
//
//  Created by kys-20 on 2019/10/17.
//  Copyright © 2019 kys-20. All rights reserved.
//

import Foundation
import UIKit
class MainTabViewController: UITabBarController {
    override func viewDidLoad() {
              super.viewDidLoad()
          //一共包含了两个视图
          let viewOne = ViewController()
          viewOne.title = "首页"
          let viewTwo = DynamicStateLController()
          viewTwo.title = "讨论"
          let viewThree = DoctorClassroomController()
          viewThree.title = "学习"
        
          //分别声明两个视图控制器
          let firstView = UINavigationController(rootViewController:viewOne)
        	
          firstView.tabBarItem.image = UIImage(named:"one")

          let secondView = UINavigationController(rootViewController:viewTwo)
          secondView.tabBarItem.image = UIImage(named:"two")
        
          let thirdView = UINavigationController(rootViewController:viewThree)
          thirdView.tabBarItem.image = UIImage(named:"three")
          self.viewControllers = [firstView,secondView,thirdView]
          self.selectedIndex = 0
    }
}
